package com.xujl.mvcbind.ui.list.view;

import com.xujl.fastlib.base.BaseView;
import com.xujl.fastlib.base.IControl;
import com.xujl.mvcbind.databinding.FragmentNestedScrollBinding;
import com.xujl.mvcbind.util.StatusBarHelper;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentPagerAdapter;


/**
 * <pre>
 *     author : xujl
 *     e-mail : 597355068@qq.com
 *     time   : 2019/08/20
 *     desc   :
 *     version: 1.0
 * </pre>
 */

public class NestedScrollFragmentView extends BaseView<FragmentNestedScrollBinding> {
    @Override
    public void init (IControl control) {
        StatusBarHelper.setTranslucent((Fragment) control, mBind.toolBar);
    }

    public void setAdapter (FragmentPagerAdapter adapter) {
        mBind.vp.setAdapter(adapter);
        mBind.tableLayout.setupWithViewPager(mBind.vp);
    }
}
